package com.linktel.productionLine.dao;


import com.linktel.productionLine.entity.WorklineDailyActualEfficiency;

import java.time.LocalDate;
import java.util.Date;
import java.util.List;
import java.util.Set;

/**
* @author Linktel
* @description 针对表【workline_daily_actual_efficiency(每日产线实时效率表)】的数据库操作Mapper
* @createDate 2023-10-10 10:26:59
* @Entity generator.domain.WorklineDailyActualEfficiency
*/
public interface WorklineDailyActualEfficiencyDao {

    int deleteByPrimaryKey(Long id);

    int insert(WorklineDailyActualEfficiency record);

    int insertSelective(WorklineDailyActualEfficiency record);

    WorklineDailyActualEfficiency selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(WorklineDailyActualEfficiency record);

    int updateByPrimaryKey(WorklineDailyActualEfficiency record);

    /**
     * 获取该年、月的已统计的日期
     * 
     * @param year 年 
     * @param month 月
     * @return 天数
     */
    Set<String> getStatisticsDateByYearAndMonth(String productionLineCode, Integer year, Integer month);

    /**
     * 补全该年、月数据
     *
     * @param workLineId 产线id
     * @param workLineCode 产线编号
     * @param workLineName 产线名称
     * @param year 年
     * @param month 月
     * @param statisticsDateList 统计日期
     * @return 是否新增成功
     */
    int saveNullDataByYearAndMonth(Long workLineId, String workLineCode, String workLineName, Integer year, Integer month, List<String> statisticsDateList);
}
